from sympy import solve, symbols

#
"""
    安装 pip install sympy
"""
x = symbols('x')
y = symbols('y')
# 3*x + 5*y - 19 = 0
# 4*x - 3*y - 6 = 0
# 求一元一次方程
# print(solve('5-x', x))
# 二元一次方程组
# print(solve(['3*x+5*y-19', '4*x-3*y-6'], [x, y]))
# 一元二次方程
print(solve('(x**2)-4*x', [x]))
print(solve('(x+4)**2-5*(x+4)', [x]))
